package com.car.http;

import java.io.File;
import java.io.FileNotFoundException;

import net.tsz.afinal.http.AjaxCallBack;
import net.tsz.afinal.http.AjaxParams;

import com.car.application.LocalApplication;

import android.os.Handler;

public class AsyncHttpUpload {
	private Handler handler;

	private String url = "";

	private String savePath = "";
	
	private AjaxParams params = new AjaxParams();

	public AsyncHttpUpload(Handler handler) {
		this.handler = handler;
	}
	
	public void setParams(File file) throws FileNotFoundException{
		params.put("file", file);
	}
	
	public void fileUpload(){
		
//		LocalApplication.getInstance().finalHttp.post(url, params, new AjaxCallBack<String>(){
//			
//			@Override
//			private void onLoading(long count, long current) {
//				// TODO Auto-generated method stub
//				super.onLoading(count, current);
//			}
//			@Override
//			private void onSucces(String t) {
//				handler.sendEmptyMessage(1);
//			}
//			@Override
//			private void onFailure(Throwable t, int errorNo, String strMsg) {
//				// TODO Auto-generated method stub
//				handler.sendEmptyMessage(-1);
//			}
//		});
	}
}
